<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>best_match_mg [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_legacy.html">过时</a> / <a href="toc_legacy_matching.html">Matching</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">best_match_mg</span><span data-if="c" style="display:none;">T_best_match_mg</span><span data-if="cpp" style="display:none;">BestMatchMg</span><span data-if="dotnet" style="display:none;">BestMatchMg</span><span data-if="python" style="display:none;">best_match_mg</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">best_match_mg</span><span data-if="c" style="display:none;">T_best_match_mg</span><span data-if="cpp" style="display:none;">BestMatchMg</span><span data-if="dotnet" style="display:none;">BestMatchMg</span><span data-if="python" style="display:none;">best_match_mg</span></code> — 在金字塔中搜索最佳灰度值匹配。</p>
<h2>警告</h2>
<p><b><code><span data-if="hdevelop" style="display:inline">best_match_mg</span><span data-if="c" style="display:none">best_match_mg</span><span data-if="cpp" style="display:none">BestMatchMg</span><span data-if="com" style="display:none">BestMatchMg</span><span data-if="dotnet" style="display:none">BestMatchMg</span><span data-if="python" style="display:none">best_match_mg</span></code> is obsolete and is only provided for
reasons of backward compatibility. New applications should use the
shape-based or NCC-based operators instead.</b></p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>best_match_mg</b>(<a href="#Image"><i>Image</i></a> :  : <a href="#TemplateID"><i>TemplateID</i></a>, <a href="#MaxError"><i>MaxError</i></a>, <a href="#SubPixel"><i>SubPixel</i></a>, <a href="#NumLevels"><i>NumLevels</i></a>, <a href="#WhichLevels"><i>WhichLevels</i></a> : <a href="#Row"><i>Row</i></a>, <a href="#Column"><i>Column</i></a>, <a href="#Error"><i>Error</i></a>)</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>T_best_match_mg</b>(const Hobject <a href="#Image"><i>Image</i></a>, const Htuple <a href="#TemplateID"><i>TemplateID</i></a>, const Htuple <a href="#MaxError"><i>MaxError</i></a>, const Htuple <a href="#SubPixel"><i>SubPixel</i></a>, const Htuple <a href="#NumLevels"><i>NumLevels</i></a>, const Htuple <a href="#WhichLevels"><i>WhichLevels</i></a>, Htuple* <a href="#Row"><i>Row</i></a>, Htuple* <a href="#Column"><i>Column</i></a>, Htuple* <a href="#Error"><i>Error</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>BestMatchMg</b>(const HObject&amp; <a href="#Image"><i>Image</i></a>, const HTuple&amp; <a href="#TemplateID"><i>TemplateID</i></a>, const HTuple&amp; <a href="#MaxError"><i>MaxError</i></a>, const HTuple&amp; <a href="#SubPixel"><i>SubPixel</i></a>, const HTuple&amp; <a href="#NumLevels"><i>NumLevels</i></a>, const HTuple&amp; <a href="#WhichLevels"><i>WhichLevels</i></a>, HTuple* <a href="#Row"><i>Row</i></a>, HTuple* <a href="#Column"><i>Column</i></a>, HTuple* <a href="#Error"><i>Error</i></a>)</code></p>
<p>
<code>void <a href="HTemplate.html">HTemplate</a>::<b>BestMatchMg</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const HString&amp; <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, const HTuple&amp; <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const</code></p>
<p>
<code>void <a href="HTemplate.html">HTemplate</a>::<b>BestMatchMg</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const HString&amp; <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, Hlong <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const</code></p>
<p>
<code>void <a href="HTemplate.html">HTemplate</a>::<b>BestMatchMg</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const char* <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, Hlong <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const</code></p>
<p>
<code>void <a href="HTemplate.html">HTemplate</a>::<b>BestMatchMg</b>(const HImage&amp; <a href="#Image"><i>Image</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const wchar_t* <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, Hlong <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
<p>
<code>void <a href="HImage.html">HImage</a>::<b>BestMatchMg</b>(const HTemplate&amp; <a href="#TemplateID"><i>TemplateID</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const HString&amp; <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, const HTuple&amp; <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const</code></p>
<p>
<code>void <a href="HImage.html">HImage</a>::<b>BestMatchMg</b>(const HTemplate&amp; <a href="#TemplateID"><i>TemplateID</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const HString&amp; <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, Hlong <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const</code></p>
<p>
<code>void <a href="HImage.html">HImage</a>::<b>BestMatchMg</b>(const HTemplate&amp; <a href="#TemplateID"><i>TemplateID</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const char* <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, Hlong <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const</code></p>
<p>
<code>void <a href="HImage.html">HImage</a>::<b>BestMatchMg</b>(const HTemplate&amp; <a href="#TemplateID"><i>TemplateID</i></a>, double <a href="#MaxError"><i>MaxError</i></a>, const wchar_t* <a href="#SubPixel"><i>SubPixel</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, Hlong <a href="#WhichLevels"><i>WhichLevels</i></a>, double* <a href="#Row"><i>Row</i></a>, double* <a href="#Column"><i>Column</i></a>, double* <a href="#Error"><i>Error</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>BestMatchMg</b>(<a href="HObject.html">HObject</a> <a href="#Image"><i>image</i></a>, <a href="HTuple.html">HTuple</a> <a href="#TemplateID"><i>templateID</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MaxError"><i>maxError</i></a>, <a href="HTuple.html">HTuple</a> <a href="#SubPixel"><i>subPixel</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevels"><i>numLevels</i></a>, <a href="HTuple.html">HTuple</a> <a href="#WhichLevels"><i>whichLevels</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#Row"><i>row</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#Column"><i>column</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#Error"><i>error</i></a>)</code></p>
<p>
<code>void <a href="HTemplate.html">HTemplate</a>.<b>BestMatchMg</b>(<a href="HImage.html">HImage</a> <a href="#Image"><i>image</i></a>, double <a href="#MaxError"><i>maxError</i></a>, string <a href="#SubPixel"><i>subPixel</i></a>, int <a href="#NumLevels"><i>numLevels</i></a>, <a href="HTuple.html">HTuple</a> <a href="#WhichLevels"><i>whichLevels</i></a>, out double <a href="#Row"><i>row</i></a>, out double <a href="#Column"><i>column</i></a>, out double <a href="#Error"><i>error</i></a>)</code></p>
<p>
<code>void <a href="HTemplate.html">HTemplate</a>.<b>BestMatchMg</b>(<a href="HImage.html">HImage</a> <a href="#Image"><i>image</i></a>, double <a href="#MaxError"><i>maxError</i></a>, string <a href="#SubPixel"><i>subPixel</i></a>, int <a href="#NumLevels"><i>numLevels</i></a>, int <a href="#WhichLevels"><i>whichLevels</i></a>, out double <a href="#Row"><i>row</i></a>, out double <a href="#Column"><i>column</i></a>, out double <a href="#Error"><i>error</i></a>)</code></p>
<p>
<code>void <a href="HImage.html">HImage</a>.<b>BestMatchMg</b>(<a href="HTemplate.html">HTemplate</a> <a href="#TemplateID"><i>templateID</i></a>, double <a href="#MaxError"><i>maxError</i></a>, string <a href="#SubPixel"><i>subPixel</i></a>, int <a href="#NumLevels"><i>numLevels</i></a>, <a href="HTuple.html">HTuple</a> <a href="#WhichLevels"><i>whichLevels</i></a>, out double <a href="#Row"><i>row</i></a>, out double <a href="#Column"><i>column</i></a>, out double <a href="#Error"><i>error</i></a>)</code></p>
<p>
<code>void <a href="HImage.html">HImage</a>.<b>BestMatchMg</b>(<a href="HTemplate.html">HTemplate</a> <a href="#TemplateID"><i>templateID</i></a>, double <a href="#MaxError"><i>maxError</i></a>, string <a href="#SubPixel"><i>subPixel</i></a>, int <a href="#NumLevels"><i>numLevels</i></a>, int <a href="#WhichLevels"><i>whichLevels</i></a>, out double <a href="#Row"><i>row</i></a>, out double <a href="#Column"><i>column</i></a>, out double <a href="#Error"><i>error</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>best_match_mg</b>(<a href="#Image"><i>image</i></a>: HObject, <a href="#TemplateID"><i>template_id</i></a>: HHandle, <a href="#MaxError"><i>max_error</i></a>: float, <a href="#SubPixel"><i>sub_pixel</i></a>: str, <a href="#NumLevels"><i>num_levels</i></a>: int, <a href="#WhichLevels"><i>which_levels</i></a>: Union[str, int]) -&gt; Tuple[float, float, float]</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p><code><span data-if="hdevelop" style="display:inline">best_match_mg</span><span data-if="c" style="display:none">best_match_mg</span><span data-if="cpp" style="display:none">BestMatchMg</span><span data-if="com" style="display:none">BestMatchMg</span><span data-if="dotnet" style="display:none">BestMatchMg</span><span data-if="python" style="display:none">best_match_mg</span></code> applies gray value matching using an
image pyramid.
<code><span data-if="hdevelop" style="display:inline">best_match_mg</span><span data-if="c" style="display:none">best_match_mg</span><span data-if="cpp" style="display:none">BestMatchMg</span><span data-if="com" style="display:none">BestMatchMg</span><span data-if="dotnet" style="display:none">BestMatchMg</span><span data-if="python" style="display:none">best_match_mg</span></code> works analogously to <a href="best_match.html"><code><span data-if="hdevelop" style="display:inline">best_match</span><span data-if="c" style="display:none">best_match</span><span data-if="cpp" style="display:none">BestMatch</span><span data-if="com" style="display:none">BestMatch</span><span data-if="dotnet" style="display:none">BestMatch</span><span data-if="python" style="display:none">best_match</span></code></a>,
but it is faster due to the use of a pyramid.
Input is an image with an optionally reduced domain. The template is
searched within those points of the domain of the image, in which
the model lies completely within the image. This means that the
model will not be found if it extends beyond the borders of the
image. The parameter <a href="#MaxError"><i><code><span data-if="hdevelop" style="display:inline">MaxError</span><span data-if="c" style="display:none">MaxError</span><span data-if="cpp" style="display:none">MaxError</span><span data-if="com" style="display:none">MaxError</span><span data-if="dotnet" style="display:none">maxError</span><span data-if="python" style="display:none">max_error</span></code></i></a> specifies the maximum error
for template matching.
Using smaller values results in a reduced runtime but it is possible
that the pattern might be missed.
The value of <a href="#MaxError"><i><code><span data-if="hdevelop" style="display:inline">MaxError</span><span data-if="c" style="display:none">MaxError</span><span data-if="cpp" style="display:none">MaxError</span><span data-if="com" style="display:none">MaxError</span><span data-if="dotnet" style="display:none">maxError</span><span data-if="python" style="display:none">max_error</span></code></i></a> has to be chosen larger compared with
<a href="best_match.html"><code><span data-if="hdevelop" style="display:inline">best_match</span><span data-if="c" style="display:none">best_match</span><span data-if="cpp" style="display:none">BestMatch</span><span data-if="com" style="display:none">BestMatch</span><span data-if="dotnet" style="display:none">BestMatch</span><span data-if="python" style="display:none">best_match</span></code></a>, because the error at higher levels
of the pyramid is often larger.
</p>
<p><a href="#SubPixel"><i><code><span data-if="hdevelop" style="display:inline">SubPixel</span><span data-if="c" style="display:none">SubPixel</span><span data-if="cpp" style="display:none">SubPixel</span><span data-if="com" style="display:none">SubPixel</span><span data-if="dotnet" style="display:none">subPixel</span><span data-if="python" style="display:none">sub_pixel</span></code></i></a> specifies if the result is calculated
with sub pixel accuracy or not.
A value of <i>1</i> for <a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a>
results in an operator similar to <a href="best_match.html"><code><span data-if="hdevelop" style="display:inline">best_match</span><span data-if="c" style="display:none">best_match</span><span data-if="cpp" style="display:none">BestMatch</span><span data-if="com" style="display:none">BestMatch</span><span data-if="dotnet" style="display:none">BestMatch</span><span data-if="python" style="display:none">best_match</span></code></a>,
i.e. only the original gray values are used.
For values larger than <i>1</i>,
the algorithm starts at the lowest resolution and searches
for a position with the lowest matching error.
At the next higher resolution this position is refined.
This is continued up to the maximum resolution
(<a href="#WhichLevels"><i><code><span data-if="hdevelop" style="display:inline">WhichLevels</span><span data-if="c" style="display:none">WhichLevels</span><span data-if="cpp" style="display:none">WhichLevels</span><span data-if="com" style="display:none">WhichLevels</span><span data-if="dotnet" style="display:none">whichLevels</span><span data-if="python" style="display:none">which_levels</span></code></i></a> = <i><span data-if="hdevelop" style="display:inline">'all'</span><span data-if="c" style="display:none">"all"</span><span data-if="cpp" style="display:none">"all"</span><span data-if="com" style="display:none">"all"</span><span data-if="dotnet" style="display:none">"all"</span><span data-if="python" style="display:none">"all"</span></i>).
As an alternative Method the mode
<a href="#WhichLevels"><i><code><span data-if="hdevelop" style="display:inline">WhichLevels</span><span data-if="c" style="display:none">WhichLevels</span><span data-if="cpp" style="display:none">WhichLevels</span><span data-if="com" style="display:none">WhichLevels</span><span data-if="dotnet" style="display:none">whichLevels</span><span data-if="python" style="display:none">which_levels</span></code></i></a> with value <i><span data-if="hdevelop" style="display:inline">'original'</span><span data-if="c" style="display:none">"original"</span><span data-if="cpp" style="display:none">"original"</span><span data-if="com" style="display:none">"original"</span><span data-if="dotnet" style="display:none">"original"</span><span data-if="python" style="display:none">"original"</span></i> can be used.
In this case not only the position with the lowest error
but all points below <a href="#MaxError"><i><code><span data-if="hdevelop" style="display:inline">MaxError</span><span data-if="c" style="display:none">MaxError</span><span data-if="cpp" style="display:none">MaxError</span><span data-if="com" style="display:none">MaxError</span><span data-if="dotnet" style="display:none">maxError</span><span data-if="python" style="display:none">max_error</span></code></i></a> are analyzed further on
in the next higher resolution.
This method is slower but it is more stable and the possibility
to miss the correct position is very low.
In this case it is often possible to start with a lower resolution (higher
level in Pyramid, i.e. larger value for <a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a>)
which leads to a reduced runtime.
Besides the values <i><span data-if="hdevelop" style="display:inline">'all'</span><span data-if="c" style="display:none">"all"</span><span data-if="cpp" style="display:none">"all"</span><span data-if="com" style="display:none">"all"</span><span data-if="dotnet" style="display:none">"all"</span><span data-if="python" style="display:none">"all"</span></i> and <i><span data-if="hdevelop" style="display:inline">'original'</span><span data-if="c" style="display:none">"original"</span><span data-if="cpp" style="display:none">"original"</span><span data-if="com" style="display:none">"original"</span><span data-if="dotnet" style="display:none">"original"</span><span data-if="python" style="display:none">"original"</span></i>
for <a href="#WhichLevels"><i><code><span data-if="hdevelop" style="display:inline">WhichLevels</span><span data-if="c" style="display:none">WhichLevels</span><span data-if="cpp" style="display:none">WhichLevels</span><span data-if="com" style="display:none">WhichLevels</span><span data-if="dotnet" style="display:none">whichLevels</span><span data-if="python" style="display:none">which_levels</span></code></i></a>
you can specify the pyramid level explicitly
where to switch between a “match all” and the ”best match”.
Here <i>0</i> corresponds to <i><span data-if="hdevelop" style="display:inline">'original'</span><span data-if="c" style="display:none">"original"</span><span data-if="cpp" style="display:none">"original"</span><span data-if="com" style="display:none">"original"</span><span data-if="dotnet" style="display:none">"original"</span><span data-if="python" style="display:none">"original"</span></i>
and <a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a> - 1 is equivalent to <i><span data-if="hdevelop" style="display:inline">'all'</span><span data-if="c" style="display:none">"all"</span><span data-if="cpp" style="display:none">"all"</span><span data-if="com" style="display:none">"all"</span><span data-if="dotnet" style="display:none">"all"</span><span data-if="python" style="display:none">"all"</span></i>. A value
in-between is in most cases a good compromise between speed
and a stable detection. A larger value for <a href="#WhichLevels"><i><code><span data-if="hdevelop" style="display:inline">WhichLevels</span><span data-if="c" style="display:none">WhichLevels</span><span data-if="cpp" style="display:none">WhichLevels</span><span data-if="com" style="display:none">WhichLevels</span><span data-if="dotnet" style="display:none">whichLevels</span><span data-if="python" style="display:none">which_levels</span></code></i></a>
results in a reduced runtime, a smaller value
results in a more stable detection.
The value of <a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a> has to be equal or smaller than
the value used to create the template.
</p>
<p>The position of the found matching position is
returned in <a href="#Row"><i><code><span data-if="hdevelop" style="display:inline">Row</span><span data-if="c" style="display:none">Row</span><span data-if="cpp" style="display:none">Row</span><span data-if="com" style="display:none">Row</span><span data-if="dotnet" style="display:none">row</span><span data-if="python" style="display:none">row</span></code></i></a> and <a href="#Column"><i><code><span data-if="hdevelop" style="display:inline">Column</span><span data-if="c" style="display:none">Column</span><span data-if="cpp" style="display:none">Column</span><span data-if="com" style="display:none">Column</span><span data-if="dotnet" style="display:none">column</span><span data-if="python" style="display:none">column</span></code></i></a>.
The corresponding error is given in <a href="#Error"><i><code><span data-if="hdevelop" style="display:inline">Error</span><span data-if="c" style="display:none">Error</span><span data-if="cpp" style="display:none">Error</span><span data-if="com" style="display:none">Error</span><span data-if="dotnet" style="display:none">error</span><span data-if="python" style="display:none">error</span></code></i></a>.
If no point below <a href="#MaxError"><i><code><span data-if="hdevelop" style="display:inline">MaxError</span><span data-if="c" style="display:none">MaxError</span><span data-if="cpp" style="display:none">MaxError</span><span data-if="com" style="display:none">MaxError</span><span data-if="dotnet" style="display:none">maxError</span><span data-if="python" style="display:none">max_error</span></code></i></a> is found
a value of <i>255</i> for <a href="#Error"><i><code><span data-if="hdevelop" style="display:inline">Error</span><span data-if="c" style="display:none">Error</span><span data-if="cpp" style="display:none">Error</span><span data-if="com" style="display:none">Error</span><span data-if="dotnet" style="display:none">error</span><span data-if="python" style="display:none">error</span></code></i></a> and
<i>0</i> for <a href="#Row"><i><code><span data-if="hdevelop" style="display:inline">Row</span><span data-if="c" style="display:none">Row</span><span data-if="cpp" style="display:none">Row</span><span data-if="com" style="display:none">Row</span><span data-if="dotnet" style="display:none">row</span><span data-if="python" style="display:none">row</span></code></i></a> and <a href="#Column"><i><code><span data-if="hdevelop" style="display:inline">Column</span><span data-if="c" style="display:none">Column</span><span data-if="cpp" style="display:none">Column</span><span data-if="com" style="display:none">Column</span><span data-if="dotnet" style="display:none">column</span><span data-if="python" style="display:none">column</span></code></i></a>
is returned. If the desired object is missed (no object found
or wrong position) you have to set <a href="#MaxError"><i><code><span data-if="hdevelop" style="display:inline">MaxError</span><span data-if="c" style="display:none">MaxError</span><span data-if="cpp" style="display:none">MaxError</span><span data-if="com" style="display:none">MaxError</span><span data-if="dotnet" style="display:none">maxError</span><span data-if="python" style="display:none">max_error</span></code></i></a> higher
or <a href="#WhichLevels"><i><code><span data-if="hdevelop" style="display:inline">WhichLevels</span><span data-if="c" style="display:none">WhichLevels</span><span data-if="cpp" style="display:none">WhichLevels</span><span data-if="com" style="display:none">WhichLevels</span><span data-if="dotnet" style="display:none">whichLevels</span><span data-if="python" style="display:none">which_levels</span></code></i></a> lower. Check also if the
illumination has changed (see <a href="set_offset_template.html"><code><span data-if="hdevelop" style="display:inline">set_offset_template</span><span data-if="c" style="display:none">set_offset_template</span><span data-if="cpp" style="display:none">SetOffsetTemplate</span><span data-if="com" style="display:none">SetOffsetTemplate</span><span data-if="dotnet" style="display:none">SetOffsetTemplate</span><span data-if="python" style="display:none">set_offset_template</span></code></a>).
</p>
<p>The maximum error of the position (without noise) is 0.1 pixel.
The average error is 0.03 pixel.
</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  
    <li>在元组级别自动并行化。</li>
  
</ul>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="Image" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></b> (input_object)  </span><span>singlechannelimage(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject</span> (byte)</span>
</div>
<p class="pardesc">Input image inside of which the pattern has to
be found.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="TemplateID" class="parname"><b><code><span data-if="hdevelop" style="display:inline">TemplateID</span><span data-if="c" style="display:none">TemplateID</span><span data-if="cpp" style="display:none">TemplateID</span><span data-if="com" style="display:none">TemplateID</span><span data-if="dotnet" style="display:none">templateID</span><span data-if="python" style="display:none">template_id</span></code></b> (input_control)  </span><span>template <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTemplate.html">HTemplate</a>, </span><span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">HHandle</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (handle)</span><span data-if="dotnet" style="display:none"> (<i>IntPtr</i>)</span><span data-if="cpp" style="display:none"> (<i>HHandle</i>)</span><span data-if="c" style="display:none"> (<i>handle</i>)</span></span>
</div>
<p class="pardesc">Template number.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="MaxError" class="parname"><b><code><span data-if="hdevelop" style="display:inline">MaxError</span><span data-if="c" style="display:none">MaxError</span><span data-if="cpp" style="display:none">MaxError</span><span data-if="com" style="display:none">MaxError</span><span data-if="dotnet" style="display:none">maxError</span><span data-if="python" style="display:none">max_error</span></code></b> (input_control)  </span><span>real <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Maximal average difference of the gray values.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>30.0</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 9.0, 11.0, 15.0, 17.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0</p>
<p class="pardesc"><span class="parcat">Value range:
      </span><code>0
          ≤
        
    <span data-if="hdevelop" style="display:inline">MaxError</span>
    <span data-if="c" style="display:none">MaxError</span>
    <span data-if="cpp" style="display:none">MaxError</span>
    <span data-if="com" style="display:none">MaxError</span>
    <span data-if="dotnet" style="display:none">maxError</span>
    <span data-if="python" style="display:none">max_error</span>
    
          ≤
          255</code></p>
<p class="pardesc"><span class="parcat">Minimum increment:
      </span>1</p>
<p class="pardesc"><span class="parcat">Recommended increment:
      </span>3</p>
</div>
  <div class="par">
<div class="parhead">
<span id="SubPixel" class="parname"><b><code><span data-if="hdevelop" style="display:inline">SubPixel</span><span data-if="c" style="display:none">SubPixel</span><span data-if="cpp" style="display:none">SubPixel</span><span data-if="com" style="display:none">SubPixel</span><span data-if="dotnet" style="display:none">subPixel</span><span data-if="python" style="display:none">sub_pixel</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Exactness in subpixels in case of <i><span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></i>.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'false'</span>
    <span data-if="c" style="display:none">"false"</span>
    <span data-if="cpp" style="display:none">"false"</span>
    <span data-if="com" style="display:none">"false"</span>
    <span data-if="dotnet" style="display:none">"false"</span>
    <span data-if="python" style="display:none">"false"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'false'</span><span data-if="c" style="display:none">"false"</span><span data-if="cpp" style="display:none">"false"</span><span data-if="com" style="display:none">"false"</span><span data-if="dotnet" style="display:none">"false"</span><span data-if="python" style="display:none">"false"</span>, <span data-if="hdevelop" style="display:inline">'true'</span><span data-if="c" style="display:none">"true"</span><span data-if="cpp" style="display:none">"true"</span><span data-if="com" style="display:none">"true"</span><span data-if="dotnet" style="display:none">"true"</span><span data-if="python" style="display:none">"true"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="NumLevels" class="parname"><b><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">int</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i>)</span><span data-if="c" style="display:none"> (<i>Hlong</i>)</span></span>
</div>
<p class="pardesc">Number of the used resolution levels.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>4</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>1, 2, 3, 4, 5, 6</p>
</div>
  <div class="par">
<div class="parhead">
<span id="WhichLevels" class="parname"><b><code><span data-if="hdevelop" style="display:inline">WhichLevels</span><span data-if="c" style="display:none">WhichLevels</span><span data-if="cpp" style="display:none">WhichLevels</span><span data-if="com" style="display:none">WhichLevels</span><span data-if="dotnet" style="display:none">whichLevels</span><span data-if="python" style="display:none">which_levels</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Union[str, int]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Resolution level up to which the
method “best match” is used.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>2</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'all'</span><span data-if="c" style="display:none">"all"</span><span data-if="cpp" style="display:none">"all"</span><span data-if="com" style="display:none">"all"</span><span data-if="dotnet" style="display:none">"all"</span><span data-if="python" style="display:none">"all"</span>, <span data-if="hdevelop" style="display:inline">'original'</span><span data-if="c" style="display:none">"original"</span><span data-if="cpp" style="display:none">"original"</span><span data-if="com" style="display:none">"original"</span><span data-if="dotnet" style="display:none">"original"</span><span data-if="python" style="display:none">"original"</span>, 0, 1, 2, 3, 4, 5, 6</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Row" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Row</span><span data-if="c" style="display:none">Row</span><span data-if="cpp" style="display:none">Row</span><span data-if="com" style="display:none">Row</span><span data-if="dotnet" style="display:none">row</span><span data-if="python" style="display:none">row</span></code></b> (output_control)  </span><span>point.y <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Row position of the best match.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Column" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Column</span><span data-if="c" style="display:none">Column</span><span data-if="cpp" style="display:none">Column</span><span data-if="com" style="display:none">Column</span><span data-if="dotnet" style="display:none">column</span><span data-if="python" style="display:none">column</span></code></b> (output_control)  </span><span>point.x <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Column position of the best match.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Error" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Error</span><span data-if="c" style="display:none">Error</span><span data-if="cpp" style="display:none">Error</span><span data-if="com" style="display:none">Error</span><span data-if="dotnet" style="display:none">error</span><span data-if="python" style="display:none">error</span></code></b> (output_control)  </span><span>real <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Average divergence of the gray values in the
best match.</p>
</div>
<h2 id="sec_result">结果</h2>
<p>If the parameter values are correct, 该算子 <code><span data-if="hdevelop" style="display:inline">best_match_mg</span><span data-if="c" style="display:none">best_match_mg</span><span data-if="cpp" style="display:none">BestMatchMg</span><span data-if="com" style="display:none">BestMatchMg</span><span data-if="dotnet" style="display:none">BestMatchMg</span><span data-if="python" style="display:none">best_match_mg</span></code>
返回值 <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
    .
If the input is empty (no input images are available) the behavior can
be set via <a href="set_system.html"><code><span data-if="hdevelop" style="display:inline">set_system('no_object_result',&lt;Result&gt;)</span><span data-if="c" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span><span data-if="cpp" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="com" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="dotnet" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="python" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span></code></a>.
如有必要，将引发异常。</p>
<h2 id="sec_predecessors">可能的前置算子</h2>
<p>
<code><a href="create_template.html"><span data-if="hdevelop" style="display:inline">create_template</span><span data-if="c" style="display:none">create_template</span><span data-if="cpp" style="display:none">CreateTemplate</span><span data-if="com" style="display:none">CreateTemplate</span><span data-if="dotnet" style="display:none">CreateTemplate</span><span data-if="python" style="display:none">create_template</span></a></code>, 
<code><a href="read_template.html"><span data-if="hdevelop" style="display:inline">read_template</span><span data-if="c" style="display:none">read_template</span><span data-if="cpp" style="display:none">ReadTemplate</span><span data-if="com" style="display:none">ReadTemplate</span><span data-if="dotnet" style="display:none">ReadTemplate</span><span data-if="python" style="display:none">read_template</span></a></code>, 
<code><a href="adapt_template.html"><span data-if="hdevelop" style="display:inline">adapt_template</span><span data-if="c" style="display:none">adapt_template</span><span data-if="cpp" style="display:none">AdaptTemplate</span><span data-if="com" style="display:none">AdaptTemplate</span><span data-if="dotnet" style="display:none">AdaptTemplate</span><span data-if="python" style="display:none">adapt_template</span></a></code>, 
<code><a href="draw_region.html"><span data-if="hdevelop" style="display:inline">draw_region</span><span data-if="c" style="display:none">draw_region</span><span data-if="cpp" style="display:none">DrawRegion</span><span data-if="com" style="display:none">DrawRegion</span><span data-if="dotnet" style="display:none">DrawRegion</span><span data-if="python" style="display:none">draw_region</span></a></code>, 
<code><a href="draw_rectangle1.html"><span data-if="hdevelop" style="display:inline">draw_rectangle1</span><span data-if="c" style="display:none">draw_rectangle1</span><span data-if="cpp" style="display:none">DrawRectangle1</span><span data-if="com" style="display:none">DrawRectangle1</span><span data-if="dotnet" style="display:none">DrawRectangle1</span><span data-if="python" style="display:none">draw_rectangle1</span></a></code>, 
<code><a href="reduce_domain.html"><span data-if="hdevelop" style="display:inline">reduce_domain</span><span data-if="c" style="display:none">reduce_domain</span><span data-if="cpp" style="display:none">ReduceDomain</span><span data-if="com" style="display:none">ReduceDomain</span><span data-if="dotnet" style="display:none">ReduceDomain</span><span data-if="python" style="display:none">reduce_domain</span></a></code>, 
<code><a href="set_reference_template.html"><span data-if="hdevelop" style="display:inline">set_reference_template</span><span data-if="c" style="display:none">set_reference_template</span><span data-if="cpp" style="display:none">SetReferenceTemplate</span><span data-if="com" style="display:none">SetReferenceTemplate</span><span data-if="dotnet" style="display:none">SetReferenceTemplate</span><span data-if="python" style="display:none">set_reference_template</span></a></code>, 
<code><a href="set_offset_template.html"><span data-if="hdevelop" style="display:inline">set_offset_template</span><span data-if="c" style="display:none">set_offset_template</span><span data-if="cpp" style="display:none">SetOffsetTemplate</span><span data-if="com" style="display:none">SetOffsetTemplate</span><span data-if="dotnet" style="display:none">SetOffsetTemplate</span><span data-if="python" style="display:none">set_offset_template</span></a></code>
</p>
<h2 id="sec_alternatives">可替代算子</h2>
<p>
<code><a href="fast_match.html"><span data-if="hdevelop" style="display:inline">fast_match</span><span data-if="c" style="display:none">fast_match</span><span data-if="cpp" style="display:none">FastMatch</span><span data-if="com" style="display:none">FastMatch</span><span data-if="dotnet" style="display:none">FastMatch</span><span data-if="python" style="display:none">fast_match</span></a></code>, 
<code><a href="fast_match_mg.html"><span data-if="hdevelop" style="display:inline">fast_match_mg</span><span data-if="c" style="display:none">fast_match_mg</span><span data-if="cpp" style="display:none">FastMatchMg</span><span data-if="com" style="display:none">FastMatchMg</span><span data-if="dotnet" style="display:none">FastMatchMg</span><span data-if="python" style="display:none">fast_match_mg</span></a></code>, 
<code><a href="best_match.html"><span data-if="hdevelop" style="display:inline">best_match</span><span data-if="c" style="display:none">best_match</span><span data-if="cpp" style="display:none">BestMatch</span><span data-if="com" style="display:none">BestMatch</span><span data-if="dotnet" style="display:none">BestMatch</span><span data-if="python" style="display:none">best_match</span></a></code>, 
<code><a href="best_match_pre_mg.html"><span data-if="hdevelop" style="display:inline">best_match_pre_mg</span><span data-if="c" style="display:none">best_match_pre_mg</span><span data-if="cpp" style="display:none">BestMatchPreMg</span><span data-if="com" style="display:none">BestMatchPreMg</span><span data-if="dotnet" style="display:none">BestMatchPreMg</span><span data-if="python" style="display:none">best_match_pre_mg</span></a></code>, 
<code><a href="best_match_rot.html"><span data-if="hdevelop" style="display:inline">best_match_rot</span><span data-if="c" style="display:none">best_match_rot</span><span data-if="cpp" style="display:none">BestMatchRot</span><span data-if="com" style="display:none">BestMatchRot</span><span data-if="dotnet" style="display:none">BestMatchRot</span><span data-if="python" style="display:none">best_match_rot</span></a></code>, 
<code><a href="best_match_rot_mg.html"><span data-if="hdevelop" style="display:inline">best_match_rot_mg</span><span data-if="c" style="display:none">best_match_rot_mg</span><span data-if="cpp" style="display:none">BestMatchRotMg</span><span data-if="com" style="display:none">BestMatchRotMg</span><span data-if="dotnet" style="display:none">BestMatchRotMg</span><span data-if="python" style="display:none">best_match_rot_mg</span></a></code>, 
<code><a href="exhaustive_match.html"><span data-if="hdevelop" style="display:inline">exhaustive_match</span><span data-if="c" style="display:none">exhaustive_match</span><span data-if="cpp" style="display:none">ExhaustiveMatch</span><span data-if="com" style="display:none">ExhaustiveMatch</span><span data-if="dotnet" style="display:none">ExhaustiveMatch</span><span data-if="python" style="display:none">exhaustive_match</span></a></code>, 
<code><a href="exhaustive_match_mg.html"><span data-if="hdevelop" style="display:inline">exhaustive_match_mg</span><span data-if="c" style="display:none">exhaustive_match_mg</span><span data-if="cpp" style="display:none">ExhaustiveMatchMg</span><span data-if="com" style="display:none">ExhaustiveMatchMg</span><span data-if="dotnet" style="display:none">ExhaustiveMatchMg</span><span data-if="python" style="display:none">exhaustive_match_mg</span></a></code>
</p>
<h2 id="sec_module">模块</h2>
<p>
Matching</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
